#ifndef SHARE_OOPS_METHOD_H
#define SHARE_OOPS_METHOD_H

#include "utilities/accessFlags.h"
#include "oops/constMethod.h"

class Method
{
private:
    AccessFlags _access_flags;
    u2 _name_index;
    u2 _signature_index; // Method signature (index in constant pool)
    ConstMethod* _const_method;
public:
    // access flag
    AccessFlags access_flags() const { return _access_flags; }
    void set_access_flags(AccessFlags flags) { _access_flags = flags; }

    void set_name_index(u2 name_index) { _name_index = name_index; }
    u2 name_index() { return _name_index; }

    void set_signature_index(int index) { _signature_index = index; }
    int signature_index() const { return _signature_index; }

    void set_const_method(ConstMethod* const_method) {
        _const_method = const_method;
    }

    ConstMethod* const_method(){return _const_method;}
};

#endif